package cloudPayAdmin.admin.dbapp.entity.hicatcard.card;

import java.util.LinkedHashMap;
import java.util.Map;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import cloudPayAdmin.admin.dbapp.entity.hicatcard.BaseEntity;
import cloudPayAdmin.util.TimeUtil;
import cloudPayAdmin.util.annotation.StringDateFormat;

@Entity
@Table(name = "t_card")
public class TCard extends BaseEntity {

	public static final String STATUS_SHOW = "1";
	public static final String STATUS_SHOW_MSG = "显示";
	public static final String STATUS_NOT_SHOW = "0";
	public static final String STATUS_NOT_SHOW_MSG = "隐藏";

	public static final String TYPE_WASH_CARD = "1";
	public static final String TYPE_WASH_CARD_MSG = "洗车卡";
	public static final String TYPE_MASTER_CARD = "2";
	public static final String TYPE_MASTER_CARD_MSG = "万能卡";
	public static final String TYPE_THIRD_CARD = "3";
	public static final String TYPE_THIRD_CARD_MSG = "第三方卡";

	public static final String LOCKSTATUS_NORMAL = "1";
	public static final String LOCKSTATUS_NORMAL_MSG = "启用";
	public static final String LOCKSTATUS_STOP = "0";
	public static final String LOCKSTATUS_STOP_MSG = "停用";

	// 状态
	public static Map<String, String> initLockStatusMap() {
		Map<String, String> lockStatusMap = new LinkedHashMap<String, String>();
		lockStatusMap.put(LOCKSTATUS_NORMAL, LOCKSTATUS_NORMAL_MSG);
		lockStatusMap.put(LOCKSTATUS_STOP, LOCKSTATUS_STOP_MSG);
		return lockStatusMap;
	}

	// 状态
	public static Map<String, String> initStatusMap() {
		Map<String, String> statusMap = new LinkedHashMap<String, String>();
		statusMap.put(STATUS_SHOW, STATUS_SHOW_MSG);
		statusMap.put(STATUS_NOT_SHOW, STATUS_NOT_SHOW_MSG);
		return statusMap;
	}

	// 状态
	public static Map<String, String> initTypeMap() {
		Map<String, String> typeMap = new LinkedHashMap<String, String>();
		typeMap.put(TYPE_WASH_CARD, TYPE_WASH_CARD_MSG);
		typeMap.put(TYPE_MASTER_CARD, TYPE_MASTER_CARD_MSG);
		typeMap.put(TYPE_THIRD_CARD, TYPE_THIRD_CARD_MSG);
		return typeMap;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "CARD_ID")
	private Long cardId;

	@Column(name = "CARD_NAME")
	private String cardName;

	@Column(name = "TYPE")
	private String type;

	@Column(name = "PICTURE_URL")
	private String pictureUlr;

	@Column(name = "DETAIL_BACKGROUND_URL")
	private String detailBackgroundUrl;

	@Column(name = "GAIN_BACKGROUND_URL")
	private String gainBackgroundUrl;

	@Column(name = "FEE")
	private Integer fee;

	@Column(name = "ORDERNUM")
	private Long orderNum;

	@Column(name = "EFFECTIVE_DAY")
	private Integer effectiveDay;

	@Column(name = "COUPON_ID")
	private Long couponId;

	@Column(name = "MERCHANT_ID")
	private String merchantId;

	@Column(name = "DETAIL")
	private String detail;

	@Column(name = "STATUS")
	private String status;

	@Column(name = "CHANGEPAGESTATUS")
	private String changePageStatus;

	@Column(name = "CREATOR")
	private String creator;

	@StringDateFormat(oriFormat = TimeUtil.DATE_PATTERN_NOSEPARTOR, destFormat = TimeUtil.DEFAULT_DATE_PATTERN)
	@Column(name = "CREATE_TIME")
	private String createTime;

	@Column(name = "UPDATE_TIME")
	private String updateTime;

	@Column(name = "ENABLE")
	private boolean enable = Boolean.TRUE;

	@Column(name = "CARDBAG_URL")
	private String cardbagUrl;
	
	@Column(name = "LOCK_STATUS")
	private String lockStatus;
	
	@StringDateFormat(oriFormat = TimeUtil.DATE_PATTERN_NOSEPARTOR, destFormat = TimeUtil.DEFAULT_DATE_PATTERN)
	@Column(name = "LOCK_START_TIME")
	private String lockStartTime;
	
	@StringDateFormat(oriFormat = TimeUtil.DATE_PATTERN_NOSEPARTOR, destFormat = TimeUtil.DEFAULT_DATE_PATTERN)
	@Column(name = "LOCK_END_TIME")
	private String lockEndTime;
	
	

	public String getLockStartTime() {
		return lockStartTime;
	}

	public void setLockStartTime(String lockStartTime) {
		this.lockStartTime = lockStartTime;
	}

	public String getLockEndTime() {
		return lockEndTime;
	}

	public void setLockEndTime(String lockEndTime) {
		this.lockEndTime = lockEndTime;
	}

	public String getLockStatus() {
		return lockStatus;
	}

	public void setLockStatus(String lockStatus) {
		this.lockStatus = lockStatus;
	}

	public String getCardbagUrl() {
		return cardbagUrl;
	}

	public void setCardbagUrl(String cardbagUrl) {
		this.cardbagUrl = cardbagUrl;
	}

	public String getChangePageStatus() {
		return changePageStatus;
	}

	public void setChangePageStatus(String changePageStatus) {
		this.changePageStatus = changePageStatus;
	}

	public String getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}

	public String getDetailBackgroundUrl() {
		return detailBackgroundUrl;
	}

	public void setDetailBackgroundUrl(String detailBackgroundUrl) {
		this.detailBackgroundUrl = detailBackgroundUrl;
	}

	public Integer getEffectiveDay() {
		return effectiveDay;
	}

	public void setEffectiveDay(Integer effectiveDay) {
		this.effectiveDay = effectiveDay;
	}

	public Long getOrderNum() {
		return orderNum;
	}

	public void setOrderNum(Long orderNum) {
		this.orderNum = orderNum;
	}

	public Long getCardId() {
		return cardId;
	}

	public void setCardId(Long cardId) {
		this.cardId = cardId;
	}

	public String getCardName() {
		return cardName;
	}

	public String getGainBackgroundUrl() {
		return gainBackgroundUrl;
	}

	public void setGainBackgroundUrl(String gainBackgroundUrl) {
		this.gainBackgroundUrl = gainBackgroundUrl;
	}

	public void setCardName(String cardName) {
		this.cardName = cardName;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getPictureUlr() {
		return pictureUlr;
	}

	public void setPictureUlr(String pictureUlr) {
		this.pictureUlr = pictureUlr;
	}

	public Integer getFee() {
		return fee;
	}

	public void setFee(Integer fee) {
		this.fee = fee;
	}

	public Long getCouponId() {
		return couponId;
	}

	public void setCouponId(Long couponId) {
		this.couponId = couponId;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

}
